// package com.jungle.sp.daily.service;
//
// import com.amazonaws.auth.AWSStaticCredentialsProvider;
// import com.amazonaws.auth.BasicAWSCredentials;
// import com.amazonaws.services.sns.AmazonSNS;
// import com.amazonaws.services.sns.AmazonSNSClientBuilder;
// import com.amazonaws.services.sns.model.PublishRequest;
// import com.amazonaws.services.sns.model.PublishResult;
// import org.springframework.beans.factory.annotation.Value;
// import org.springframework.stereotype.Service;
//
// @Service
// public class SmsService {
//
//     private final AmazonSNS snsClient;
//
//     public SmsService(@Value("${aws.accessKey}") String accessKey,
//                       @Value("${aws.secretKey}") String secretKey,
//                       @Value("${aws.region}") String region) {
//         BasicAWSCredentials awsCredentials = new BasicAWSCredentials(accessKey, secretKey);
//         this.snsClient = AmazonSNSClientBuilder.standard()
//                 .withCredentials(new AWSStaticCredentialsProvider(awsCredentials))
//                 .withRegion(region)
//                 .build();
//     }
//
//     public void sendSms(String phoneNumber, String message) {
//         PublishRequest publishRequest = new PublishRequest()
//                 .withMessage(message)
//                 .withPhoneNumber(phoneNumber);
//         PublishResult publishResult = snsClient.publish(publishRequest);
//         System.out.println("Message sent! Message ID: " + publishResult.getMessageId());
//     }
// }
